<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>操作记录</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"><!-- 确保适当的绘制和触屏缩放 -->
    <link rel="stylesheet" href="{$url_css}/bootstrap.min.css" type="text/css">
    <script type="text/javascript" src="{$url_js}calendar/WdatePicker.js"></script>
</head>
<body>
    <div class="container" style="width:96%">
        <form action="?do=default" method="get">
            <table class="table table-bordered table-striped" align="center">
                <tr>
                    <td colspan="5">查询条件</td>
                </tr>
                <tr>
                    <td class="form-group col-xs-2">
                        <div class="input-group">
                            <div class="input-group-addon">管理员ID</div>
                            <input type="text" class="form-control" name="user_id" placeholder="管理员ID" value="{if $user_id}{$user_id}{/if}">
                        </div>
                    </td>
                    <td class="form-group col-xs-2">
                        <div class="input-group">
                            <div class="input-group-addon">昵称</div>
                            <input type="text" class="form-control" name="user_name" placeholder="昵称" value="{$user_name}">
                        </div>
                    </td>
                    <td class="form-group col-xs-2">
                        <div class="input-group">
                            <div class="input-group-addon">对象ID</div>
                            <input type="text" class="form-control" name="item_id" placeholder="对象ID" value="{if $item_id}{$item_id}{/if}" onkeyup="this.value=this.value.replace(/[^\d]/g,'')">
                        </div>
                    </td>
                    <td class="form-group col-xs-2">
                        <div class="input-group">
                            <div class="input-group-addon">Key</div>
                            <input type="text" class="form-control" name="menu_key" placeholder="Key" value="{$menu_key}">
                        </div>
                    </td>
                    <td class="form-group col-xs-2">
                        <div class="input-group">
                            <div class="input-group-addon">细分</div>
                            <input type="text" class="form-control" name="log_flag" placeholder="细分" value="{$log_flag}">
                        </div>
                    </td>
                </tr>
                <tr>
                    <td class="form-inline">
                        <div class="input-group">
                            <div class="input-group-addon">开始时间</div>
                            <input class="form-control" id="start_time" name="start_time" type="text" onFocus="WdatePicker({literal}{startDate:'%y-%M-%d 00:00:00',dateFmt:'yyyy-MM-dd HH:mm:ss',maxDate:'#F{$dp.$D(\'end_time\')}'}{/literal});" value="{$start_time}" readonly="">
                        </div>
                    </td>
                    <td class="form-inline">
                        <div class="input-group">
                            <div class="input-group-addon">结束时间</div>
                            <input class="form-control" id="end_time" name="end_time" type="text" onFocus="WdatePicker({literal}{startDate:'%y-%M-%d 23:59:59',dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'start_time\')}'}{/literal});" value="{$end_time}" readonly="">
                        </div>
                    </td>
                    <td class="form-group col-xs-2" colspan="3">
                        <input type="submit" value="搜索" class="btn btn-primary" />
                    </td>
                </tr>
            </table>
        </form>

        <table class="table table-bordered table-striped" align="center">
            <thead>
                <tr>
                    <td colspan="8"><strong>操作记录总数：{$total} 条</strong> &nbsp;&nbsp;&nbsp;&nbsp; <strong>按项目ID去重后总数：{$distotal} 条</strong></td>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>时间</td>
                    <td>管理员ID</td>
                    <td>管理员</td>
                    <td>操作Key</td>
                    <td>操作名称</td>
                    <td>细分操作</td>
                    <td>项目ID</td>
                    <td>详细日志</td>
                </tr>
                {if !empty($data)}
                    {foreach $data as $v}
                        <tr>
                            <td>{$v.CreateTime|html}</td>
                            <td>{$v.UserId}</td>
                            <td>{$v.UserName|html}</td>
                            <td>{$v.MenuKey|html}</td>
                            <td>{$v.ItemName|html}</td>
                            <td>{$v.LogFlag}</td>
                            <td>{$v.ItemId}</td>
                            <td><span title="{$v.Log|html}">{$v.Log|truncate:80:"...":true|html}</span></td>
                        </tr>
                    {/foreach}
                {/if}

                {if $pagination != ''}
                    <tr><td colspan="8" align="right">{$pagination}</td></tr>
                {/if}
            </tbody>
        </table>
    </div>
</body>
<html>
    